// 引入全局样式
import "virtual:windi-base.css";
import "virtual:windi-components.css";
import "virtual:windi-utilities.css";
import "ant-design-vue/dist/antd.css";
import "@/assets/styles/index.less";

import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";

import hljs from "highlight.js";
import "highlight.js/styles/color-brewer.css";

// VbenUi
import VbenUi from "../packages/index";

const app = createApp(App);
app.use(VbenUi);

app.directive("highlight", function (el) {
  const blocks = el.querySelectorAll("pre code");
  blocks.forEach((block: any) => {
    hljs.highlightBlock(block);
  });
});
app.use(router);
app.mount("#app");
